<?php

namespace ticket\modules\backend\models;

use Yii;

/**
 * This is the model class for table "tk_order_details".
 *
 * @property int $id
 * @property int $oid
 * @property int $tid
 * @property string $name
 * @property string $phone
 * @property string $certificate
 * @property int $ticket_num
 * @property string $reserve_time
 * @property string $price
 * @property string $valid_time
 * @property string $is_use
 * @property string $verification_code
 * @property string $verification_time
 * @property string $create_time
 */
class OrderDetails extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'tk_order_details';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['oid', 'tid', 'name', 'phone', 'certificate'], 'required'],
            [['oid', 'tid', 'ticket_num'], 'integer'],
            [['reserve_time', 'valid_time', 'verification_time', 'create_time'], 'safe'],
            [['price'], 'number'],
            [['is_use'], 'string'],
            [['name'], 'string', 'max' => 16],
            [['phone'], 'string', 'max' => 11],
            [['certificate'], 'string', 'max' => 32],
            [['verification_code'], 'string', 'max' => 255],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'oid' => 'Oid',
            'tid' => 'Tid',
            'name' => 'Name',
            'phone' => 'Phone',
            'certificate' => 'Certificate',
            'ticket_num' => 'Ticket Num',
            'reserve_time' => 'Reserve Time',
            'price' => 'Price',
            'valid_time' => 'Valid Time',
            'is_use' => 'Is Use',
            'verification_code' => 'Verification Code',
            'verification_time' => 'Verification Time',
            'create_time' => 'Create Time',
        ];
    }
}
